$(function() {
    $('#tab').on('click','.tab-item',function(){
		if(!$(this).hasClass('current')){
			$('.tab-item').removeClass('current');
			$(this).addClass('current');
			$('#tab-content .tab-pane').hide();
			$($(this).attr('role')).show();
		}
	});
	$("#left_hidden").on('click',function(l) {
		if($(this).hasClass("show")){
			$(this).removeClass("show");
			$(this).attr({title: "\u6536\u8d77\u5de6\u680f"});
		    $(".left_hidden").css("left", "304px");
			$("#left").css("display", "block");
			$("#right").css({
				width: $(window).width() - 304,
				left: 304
			}).attr("data-calc-width", "100%-304px");
		}else{
			$(this).addClass("show");
			$(this).attr({title: "\u5c55\u5f00\u5de6\u680f"});
			$("#left").css("display", "none");
			$(this).css("left", "0px");
			$("#right").css({
				width: $(window).width(),
				left: 0
			}).attr("data-calc-width", "100%-0px");
		}
	});
	
	$('.dropdown').hover(function(){
		$(this).find('.dropdown-div').show();
	},function(){
		$(this).find('.dropdown-div').hide();
	});

	//省弹窗关闭
	$("#dict_close").click(function() {
		$("#dictDiv").css("display","none");
	  });
 
	  //省弹窗打开
	  $("#dict_text").click(function() {
		$("#dictDiv").css("display","block");
	  });
	  
	  //省市地区选择
	  $("#dict_item").on("click","li",function(){
 
		 var  addressName = $(this).find("a").html();
		 $("#dict_text").html(addressName);
		 $("#dictDiv").css("display","none");
 
	  });

	  $("#dict_list_title").on("click",".sheng",function(){
		 var addressName = $(this).html();
		 $("#dict_text").html(addressName);
		 $("#dictDiv").css("display","none");
	  });
	

});
$(window).resize(function() {
   $('.cesium-viewer-cesiumWidgetContainer').height($('#cesiumContainer').height());
});
